﻿using System.Drawing;

namespace zaoxiaoren
{
    public class person_build
    {
        public Graphics g;
        public Pen p;

        public person_build(Graphics g, Pen p)
        {
            this.g = g;
            this.p = p;
        }

        public virtual void build_head() { }

        public virtual void build_body() { }

        public virtual void build_armleft() { }

        public virtual void build_armright() { }

        public virtual void build_legleft() { }

        public virtual void build_legright() { }
    }

    public class person_thin : person_build
    {
        public person_thin(Graphics g, Pen p)
            : base(g, p)
        {
        }

        public override void build_head()
        {
            g.DrawEllipse(p, 50, 20, 30, 30);
        }

        public override void build_body()
        {
            g.DrawRectangle(p, 60, 50, 10, 50);
        }

        public override void build_armleft()
        {
            g.DrawLine(p, 60, 50, 40, 100);
        }

        public override void build_armright()
        {
            g.DrawLine(p, 70, 50, 90, 100);
        }

        public override void build_legleft()
        {
            g.DrawLine(p, 60, 100, 45, 150);
        }

        public override void build_legright()
        {
            g.DrawLine(p, 70, 100, 85, 150);
        }
    }

    public class person_fat : person_build
    {
        public person_fat(Graphics g, Pen p)
            : base(g, p)
        {
        }

        public override void build_head()
        {
            g.DrawEllipse(p, 50, 20, 30, 30);
        }

        public override void build_body()
        {
            g.DrawEllipse(p, 40, 50, 40, 50);
        }

        public override void build_armleft()
        {
            g.DrawLine(p, 50, 50, 30, 100);
        }

        public override void build_armright()
        {
            g.DrawLine(p, 80, 50, 100, 100);
        }

        public override void build_legleft()
        {
            g.DrawLine(p, 60, 100, 45, 150);
        }

        public override void build_legright()
        {
            g.DrawLine(p, 70, 100, 85, 150);
        }
    }

    internal class person_director
    {
        private person_build pb;

        public person_director(person_build pb)
        {
            this.pb = pb;
        }

        public void create_person()
        {
            pb.build_head();
            //pb.build_body();
            pb.build_armleft();
            pb.build_armright();
            pb.build_legleft();
            pb.build_legright();
        }
    }
}